home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / cppsum.zip / CPPSUMV.TXT < prev    next >
Text File  |  1994-06-18  |  3KB  |  74 lines

  1. '---------------------------------------------------------------------------
  2. ' Visual Basic interface definitions for CPPSUM.DLL
  3. ' DLL functions to get summary info from OLE 2.0 document files.
  4. '
  5. '     Copyright ⌐ 1994 Somar Software, All Rights Reserved
  6. '     Send problem reports and comments to 72202.2574@compuserve.com
  7. '
  8. ' Example of usage:
  9. '    Dim wInitStatus as Integer, hSumInfo As Integer, bResult As Integer
  10. '    Dim s$, yr%, mon%, dy%, hr%, min%, sec%
  11. '    wInitStatus = SumInfoInit()
  12. '    If wInitStatus <> 0 Then
  13. '       hSumInfo = SumInfoOpenFile("..put your file name here..")
  14. '       If hSumInfo <> 0 Then
  15. '          s$ = String$(256, " ")
  16. '          bResult = SumInfoGetString(hSumInfo, PID_TITLE, s$, 256)
  17. '          bResult = SumInfoGetTime(hSumInfo, PID_LASTSAVED, yr%, mon%, dy%, hr%, min%, sec%)
  18. '          SumInfoCloseFile (hSumInfo)
  19. '       End If
  20. '       SumInfoUninit(wInitStatus)
  21. '    End If
  22. '
  23. ' Reasons for failure:
  24. '     SumInfoInit:     out of memory
  25. '     SumInfoOpenFile: out of memory
  26. '                      file not found
  27. '                      file is not an OLE 2.0 structured storage file
  28. '                      file does not contain OLE 2.0 summary info
  29. '                      OLE 2.0 summary info is incorrectly formatted
  30. '     SumInfoGet...  : specified property type is not available
  31. '     
  32. ' See CPPSUM.H for change log
  33. '---------------------------------------------------------------------------
  34.  
  35.    ' String properties 
  36. Global Const PID_TITLE          = &H02
  37. Global Const PID_SUBJECT        = &H03
  38. Global Const PID_AUTHOR         = &H04
  39. Global Const PID_KEYWORDS       = &H05
  40. Global Const PID_COMMENTS       = &H06
  41. Global Const PID_TEMPLATE       = &H07
  42. Global Const PID_LASTAUTHOR     = &H08
  43. Global Const PID_REVNUMBER      = &H09
  44. Global Const PID_APPNAME        = &H12
  45.  
  46.    ' Time properties
  47. Global Const PID_TOTAL_EDITTIME = &H0A
  48. Global Const PID_LASTPRINTED    = &H0B
  49. Global Const PID_CREATED        = &H0C
  50. Global Const PID_LASTSAVED      = &H0D
  51.  
  52.    ' Long integer properties
  53. Global Const PID_PAGECOUNT      = &H0E
  54. Global Const PID_WORDCOUNT      = &H0F
  55. Global Const PID_CHARCOUNT      = &H10
  56. Global Const PID_SECURITY       = &H13
  57.  
  58.    ' bit masks for security long integer
  59. Global Const AllSecurityFlagsEqNone         = &H00
  60. Global Const fSecurityPassworded            = &H01
  61. Global Const fSecurityRORecommended         = &H02
  62. Global Const fSecurityRO                    = &H04
  63. Global Const fSecurityLockedForAnnotations  = &H08
  64.  
  65. Declare Function SumInfoInit Lib "CPPSUM.DLL" () As Integer
  66. Declare Function SumInfoOpenFile Lib "CPPSUM.DLL" (ByVal szPath As String) As Integer
  67. Declare Function SumInfoGetString Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer, ByVal pid As Long, ByVal lpBuf As String, ByVal cbBuf As Integer) As Integer
  68. Declare Function SumInfoGetLong Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer, ByVal pid As Long, lpLong As Long) As Integer
  69. Declare Function SumInfoGetTime Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer, ByVal pid As Long, lpYr%, lpMon%, lpDay%, lpHr%, lpMin%, lpSec%) As Integer
  70. Declare Sub SumInfoCloseFile Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer)
  71. Declare Sub SumInfoUninit Lib "CPPSUM.DLL" (ByVal wInitStatus as Integer)
  72.  
  73.  
  74.